package com.zzy.chapter4.strategy.context;

import com.zzy.chapter4.pojo.Order;
import com.zzy.chapter4.strategy.PayStrategyInterface;

public class PayContext extends AbstractPayContext {

    private PayStrategyInterface payStrategy;

    public PayContext(PayStrategyInterface payStrategy) {
        this.payStrategy = payStrategy;
    }

    public String execute(Order order) {
        return payStrategy.pay(order);
    }

}
